<?php
/**
 * Template name: Login
 * Login code file
 * 
 * TODO: Validação Javascript do formulário
 * 
 * @package WordPress
 * @subpackage wp-dev
 */
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
<head>
	<?php get_header(); ?>
</head>
<body>	
	
	<!-- Wrapper -->
	<div id="page" class="cadastro">
		<?php include(TEMPLATEPATH . "/dev/includes/header.php"); ?>
		<!-- Content -->
		<div class="content">
			<div id="container">
				<div class="wrapper">
					<!-- Me Apague -->
						<div class="title-explain">
							WP Dev Theme <?php echo WPDEV_VERSION;?> - login.php
						</div>
						<p>
							Esse arquivo é o login.php. Esse arquivo é usado para login customizado do site.<br />
							Esse arquivo só funciona com o permalink customizado ativado.
						</p>
					<!-- //Me Apague -->
					
					<h1 class="page-title txt-replace pngfix"><span class="ico-title pngfix">Login</span></h1>
					
						<div class="entry">
							<div class="form-cadastro">
								<?php if($_POST):?>
									<p class="error">
										<?php
											foreach ($errors as $erro){
												foreach ($erro as $error){
													echo $error[0];
													break;
												}
											}
										?>
									</p>
								<?php endif;?>
								<form method="post" action="<?php echo site_url('wp-login.php', 'login_post'); ?>" id="loginform" name="loginform">

									<label class="fld">
										<span>
											<input type="text" tabindex="10" size="20" value="Email*" title="Email*" class="labeled" id="user_login" name="log" />
										</span>
									</label>
									
									<label class="fld">
										<span>
											<input type="password" tabindex="20" size="20" value="Senha*" title="Senha*" class="labeled" id="user_pass" name="pwd" />
										</span>
									</label>
									
									<input type="hidden" value="<?php if(isset($_REQUEST["redirect_to"])) echo $_REQUEST["redirect_to"]; else bloginfo('wpurl');?>" name="redirect_to" />
									<input type="hidden" name="testcookie" value="1" />
									
									<p>
										<span class="required">*Campo obrigatório</span> <a href="<?php echo site_url('wp-login.php?action=lostpassword', 'login') ?>" class="forgot-password">Esqueci minha senha</a>
									</p>
									
									<p>
										<button type="submit">
											<span class="primary-button">
												<span>Acessar</span>
											</span>
										</button>
									</p>
									
								</form>
								
							</div>
						</div>
				</div>
				<?php get_sidebar();?>
			</div>
		</div>
		<!-- // Content -->
		<?php include(TEMPLATEPATH."/dev/includes/footer.php")?>
	</div>
	<!-- // Wrapper -->
		
<?php get_footer(); ?>
</body>
</html>